package org.example.cassell_client.service;

import com.github.pagehelper.PageInfo;
import org.example.cassell_client.service.fallback.UserClientFallbackFactory;
import org.example.entity.Base.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(name = "user", url = "http://localhost:8086/dc" ,fallbackFactory = UserClientFallbackFactory.class)
public interface UserServiceClient {
    @GetMapping("/user/list")
    Result<PageInfo> list(@RequestParam(name="PageNumber", defaultValue = "1")int PageNumber, @RequestParam(name="PageSize", defaultValue = "5")int PageSize);

    @GetMapping("/user/userl")
    List userl();
    @GetMapping("/user/getUserInfo")
    String getUserInfo(@RequestParam("userEmail") String userEmail);
    @GetMapping("/user/getUserPicture")
    String getUserPicture(@RequestParam("userEmail") String userEmail);
    @PostMapping("/user/updatePassWord")
    String updatePassWord(@RequestParam String Email,@RequestParam String UserPassWord);
    @PostMapping("/user/updateUser")
    String updateUser(@RequestBody Map<String, String> body);
}
